x1,x2 = np.meshgrid(np.arange(-5.5,1.0,0.1),np.arange(-3.0,1.0,0.1)) 
def f_2d(x1, x2): # 目标函数
    return x1**2 + 2*x2**2
z = f_2d(x1, x2) # x1,x2: (40,65)  z:(40,65)
